home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / FILE_SEA / FILESCAN.H < prev    next >
Text File  |  1991-01-14  |  2KB  |  80 lines

  1. /* definitions and declarations for our HFS stdio */
  2.  
  3. #define _H_HFSScan
  4. #include "HFS.h"
  5.  
  6. #define        UPPERMASK    0xFFL
  7. #define        NOLOOK        0L        /*unused*/
  8. #define        RESTRICT    0x1L    /*do not search in folders below current                        */
  9. #define        CURRENT        0x2L    /*current folder                                                */
  10. #define        BOOTDIR        0x4L    /*blessed folder                                                */
  11. #define        FOLDER        0x8L    /*current folder and any folder within the current folder        */
  12. #define        PARENT        0x10L    /*start at parent folder of current                                */
  13. #define        WVOLUME        0x20L    /*the whole volume                                                */
  14. #define        ALLVOLUME    0x40L    /*all mounted volumes                                            */
  15. #define        ALLWD        0x80L    /*all working directorys (used internally)                        */
  16.  
  17. #define        fIsLock            0x1
  18. #define        fResOpen        0x4
  19. #define        fDataOpen        0x8
  20. #define        fIsDir            0x10
  21. #define        fFileOpen        0x80
  22.  
  23. typedef struct {
  24.     int        noOfTypes;
  25.     long    fileTypes[];
  26. } FileTypeRec;
  27.  
  28.  
  29. typedef struct {
  30.     char    fileName[32];
  31.     short    ioVRefNum;
  32.     long    ioDirID;
  33.     } fileFindRec;
  34.  
  35. typedef struct {
  36.     char    fileName[32];
  37.     long    ioDirID;
  38.     char    volName[32];
  39.     } fileSaveRec;
  40.     
  41.     
  42. typedef struct {
  43.     long    ndFLink;
  44.     long    ndBLink;
  45.     Byte    ndType;
  46.     Byte    ndLevel;
  47.     short    ndNRecs;
  48.     short    filler;
  49.     } B_StrNdRec;
  50.     
  51. typedef struct {
  52.     B_StrNdRec    catNdHd;    /* Node Header */
  53.     short    catNLevel;        /* # of tree levels */
  54.     long    catRootNd;        /* Root Node # */
  55.     long    catNLeafNd;        /* number of leaf nodes */
  56.     long    catFstLeafNd;    /* # of First leaf node */
  57.     long    catLstLeafNd;    /* # of last leaf node */
  58.     short    catNdSize;        /* Size of node in bytes */
  59.     short    catMaxKeyLn;    /* maximun key len */
  60.     long    catNoOfNd;        /* # of nodes */
  61.     long    catNFreeNd;        /* number of free nodes */
  62.     } CatHdNdRec;
  63.     
  64. typedef struct {
  65.     Byte    ckrKeyLen;        /* key length in bytes */
  66.     Byte    ckrResrv1;        /* Reserved # */
  67.     long    ckrParID;        /* Parent ID */
  68.     char    ckrCName;        /* file or directory name */
  69.     long    ckrLink;        /* node ID of key */
  70.     } CatKeyRec;
  71.     
  72.  
  73.  
  74. /*--------------------------------------------------------------------------*/
  75. /*                                                                            */
  76. /*                           Prototypes                                        */
  77. /*                                                                            */
  78. /*--------------------------------------------------------------------------*/
  79.  
  80.